Greater Than (>) Operator in SAP ABAP

The Greater than (>) Operator in SAP ABAP Checks if the left operand is greater than the right operand.

DATA(lv_variable1) TYPE i VALUE 15.
DATA(lv_variable2) TYPE i VALUE 10.

IF lv_variable1 > lv_variable2.
WRITE: 'Variable1 is greater than Variable2.'.
ENDIF.


Output:

Variable1 is greater than Variable2


Relational operators in SAP ABAP

Relational operators in SAP ABAP are symbols or combinations of symbols that compare values and return a Boolean result (either true or false). These operators allow developers to establish relationships between variables, constants, or expressions, facilitating decision-making processes in the program’s logic. Relational operators in SAP ABAP are employed in conditional statements and expressions to control the flow of a program. They help determine whether a particular condition is true or false, guiding the program to execute specific code blocks accordingly. The relational operators in SAP ABAP include equality, inequality, greater than, less than, greater than or equal to, and less than or equal to.

Relational operators in SAP ABAP

Similar Reads

What are Conditional/ Relational Operators in SAP ABAP?

Comparison operators in SAP ABAP are utilized to compare data and offer conclusions depending on the comparison’s results. These operators include equal to (EQ), not equal to (NE), less than (LT), less than or equal to(LT) , greater than(GT) , and greater than or equal to (GE). Here we are sharing you a table in which every comparison operator is discussed in detail....

Examples of Relational Operators in SAP ABAP:

Let’s delve into each relational operator of SAP ABAP with examples:...

Equals (=) Operator in SAP ABAP:

The Equals(=) operator in SAP ABAP Checks if two values are equal ....

Not Equals (<>) Operator in SAP ABAP:

The Not Equals(<>) operator in SAP ABAP Checks if two values are not equal to each other....

Less Than (<) Operator in SAP ABAP:

The less than (<) Operator in SAP ABAP Checks if the left operand is less than the right operand....

Greater Than (>) Operator in SAP ABAP:

The Greater than (>) Operator in SAP ABAP Checks if the left operand is greater than the right operand....

Less Than or Equal To (<=) Operator in SAP ABAP:

The Less than or Equal to (<=) Operator in SAP ABAP Checks if the left operand is less than or equal to the right operand....

Greater Than or Equal To (>=) Operator in SAP ABAP:

The Greater than oe equal to (>=) Operator in SAP ABAP Checks if the left operand is greater than or equal to the right operand....

FAQs On Relational Operator in SAP ABAP

1. What is Between Operator in SAP ABAP?...